projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3dac21f
)
GtkProgressBar: trivial conditional optimisation
author
Daniel Boles
<dboles@src.gnome.org>
Sat, 3 Dec 2016 02:35:27 +0000
(
02:35
+0000)
committer
Daniel Boles
<dboles@src.gnome.org>
Sat, 3 Dec 2016 16:27:03 +0000
(16:27 +0000)
I'd hope the compiler would realise this for us, but let's be explicit.
gtk/gtkprogressbar.c
patch
|
blob
|
history
diff --git
a/gtk/gtkprogressbar.c
b/gtk/gtkprogressbar.c
index 4fcfa145186bc49baacb038d53397dfdfe067a04..aa2fa81ece3593b71cb8cacd985e163138b2c9d8 100644
(file)
--- a/
gtk/gtkprogressbar.c
+++ b/
gtk/gtkprogressbar.c
@@
-338,8
+338,7
@@
update_fraction_classes (GtkProgressBar *pbar)
{
if (priv->fraction <= 0.0)
empty = TRUE;
-
- if (priv->fraction >= 1.0)
+ else if (priv->fraction >= 1.0)
full = TRUE;
}